inherited FRM_PesquisaUsuarioGrupo: TFRM_PesquisaUsuarioGrupo
  Left = 456
  Top = 219
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 15
  inherited gbPadrao: TAdvGroupBox
    inherited edtPesquisar: TAdvEdit
      EmptyText = 'Informe o nome do grupo para localiz'#225'-lo...'
    end
    inherited GridPesquisar: TJvDBGrid
      Columns = <
        item
          Expanded = False
          FieldName = 'GRUPO'
          Title.Alignment = taCenter
          Title.Caption = 'Descri'#231#227'o do Grupo de Acesso / Permiss'#245'es'
          Width = 350
          Visible = True
        end
        item
          Alignment = taCenter
          Expanded = False
          FieldName = 'USUARIOS'
          Title.Alignment = taCenter
          Title.Caption = 'Usu'#225'rios'
          Width = 54
          Visible = True
        end>
    end
    inherited pnlRodape: TPanel
      inherited lblTotal: TLabel
        Width = 77
        Caption = 'Total: 0 grupos'
        Font.Color = clBlack
        ParentFont = False
      end
    end
    inherited pnlTitulo: TPanel
      Caption = 'Pesquisar Lista de Grupos de Acesso'
    end
  end
  inherited sqlPesquisar: TSQLQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'empresa'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select distinct'
      '    u.cod_grupo,'
      '    u.descricao as grupo,'
      '    (select count(a.lig_cod_usuario)'
      '     from usuario_multiempresa a'
      '     where a.lig_cod_grupo = u.cod_grupo and'
      '           a.lig_cod_empresa = u.lig_cod_empresa) as usuarios'
      'from usuario_grupo u'
      
        'left join usuario_multiempresa b on (b.lig_cod_grupo = u.cod_gru' +
        'po)'
      'where u.lig_cod_empresa = :empresa')
  end
  inherited cdsPesquisar: TClientDataSet
    object cdsPesquisarCOD_GRUPO: TIntegerField
      FieldName = 'COD_GRUPO'
      Required = True
    end
    object cdsPesquisarGRUPO: TStringField
      FieldName = 'GRUPO'
      Size = 100
    end
    object cdsPesquisarUSUARIOS: TIntegerField
      FieldName = 'USUARIOS'
      Required = True
    end
  end
end
